Optimal. Leaf size=325 \[ \frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}+\frac {b E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{\left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {\left (2 a b c-3 a^2 d+b^2 d\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) (a+b)^2 (b c-a d) f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.62, antiderivative size = 325, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2881, 3138,
2734, 2732, 3081, 2742, 2740, 2886, 2884} \begin {gather*} \frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{f \left (a^2-b^2\right ) (b c-a d) (a+b \sin (e+f x))}-\frac {\sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{f \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {b \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{f \left (a^2-b^2\right ) (b c-a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (-3 a^2 d+2 a b c+b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{f (a-b) (a+b)^2 (b c-a d) \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2881
Rule 2884
Rule 2886
Rule 3081
Rule 3138
Rubi steps
\begin {align*} \int \frac {1}{(a+b \sin (e+f x))^2 \sqrt {c+d \sin (e+f x)}} \, dx &=\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}-\frac {\int \frac {\frac {1}{2} \left (-2 a b c+2 a^2 d-b^2 d\right )-a b d \sin (e+f x)-\frac {1}{2} b^2 d \sin ^2(e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{\left (a^2-b^2\right ) (b c-a d)}\\ &=\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}+\frac {b \int \sqrt {c+d \sin (e+f x)} \, dx}{2 \left (a^2-b^2\right ) (b c-a d)}+\frac {\int \frac {\frac {1}{2} b d \left (a b c-2 a^2 d+b^2 d\right )-\frac {1}{2} b^2 d (b c-a d) \sin (e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{b \left (a^2-b^2\right ) d (b c-a d)}\\ &=\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}-\frac {\int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{2 \left (a^2-b^2\right )}+\frac {\left (2 a b c-3 a^2 d+b^2 d\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{2 \left (a^2-b^2\right ) (b c-a d)}+\frac {\left (b \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{2 \left (a^2-b^2\right ) (b c-a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}\\ &=\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}+\frac {b E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {\sqrt {\frac {c+d \sin (e+f x)}{c+d}} \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {\left (\left (2 a b c-3 a^2 d+b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 \left (a^2-b^2\right ) (b c-a d) \sqrt {c+d \sin (e+f x)}}\\ &=\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f (a+b \sin (e+f x))}+\frac {b E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (b c-a d) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{\left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {\left (2 a b c-3 a^2 d+b^2 d\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) (a+b)^2 (b c-a d) f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 26.89, size = 871, normalized size = 2.68 \begin {gather*} -\frac {b^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) (-b c+a d) f (a+b \sin (e+f x))}+\frac {-\frac {2 \left (-4 a b c+4 a^2 d-3 b^2 d\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (-e+\frac {\pi }{2}-f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a+b) \sqrt {c+d \sin (e+f x)}}+\frac {8 i a \cos (e+f x) \left ((b c-a d) F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+a d \Pi \left (\frac {b (c+d)}{b c-a d};i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+a d+b (c+d \sin (e+f x)))}{d \sqrt {-\frac {1}{c+d}} (b c-a d) (a+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}-\frac {2 i \cos (e+f x) \cos (2 (e+f x)) \left (2 b (c-d) (b c-a d) E\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+d \left (-2 (a+b) (-b c+a d) F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+\left (2 a^2-b^2\right ) d \Pi \left (\frac {b (c+d)}{b c-a d};i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+a d+b (c+d \sin (e+f x)))}{\sqrt {-\frac {1}{c+d}} (b c-a d) (a+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \left (-2 c^2+d^2+4 c (c+d \sin (e+f x))-2 (c+d \sin (e+f x))^2\right ) \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}}{4 (a-b) (a+b) (-b c+a d) f} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 17.10, size = 690, normalized size = 2.12
method | result | size |
default | \(\frac {\sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {b^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \left (a +b \sin \left (f x +e \right )\right )}-\frac {a d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {b d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+\EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\frac {\left (3 a^{2} d -2 a b c -b^{2} d \right ) \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticPi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {-\frac {c}{d}+1}{-\frac {c}{d}+\frac {a}{b}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) b \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {c}{d}+\frac {a}{b}\right )}\right )}{\cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(690\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2\,\sqrt {c+d\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________